// File resource manager
// Copyright 2005 (C) Ralph Thomas

#ifndef UTIL_RESOURCES_H
#define UTIL_RESOURCES_H

#include <boost/filesystem/path.hpp>
#include <adobe/adam.hpp>
#include <string>

namespace util {
	//
	// boost::filesystem::path getResource( string mimetype, string res )
	//
	/// This function returns the path of the required resource, if it exists,
	/// or an empty path if the resource can't be found.
	///
	/// \param	mimetype	the full MIME type of the resource required.
	/// \param	res		the name of the resource required, e.g.: "eve",
	///				"16.png"
	/// \return	the path to the required resource, or an empty path if the
	///		resource cannot be found.
	//
	boost::filesystem::path getResource( const std::string& mimetype,
		const std::string& res );
	//
	// adobe::sheet_t* getSheet( string mimetype, string url )
	// 
	/// This function will return a sheet setup for the model with the given
	/// URL and mimetype. The mimetype is used to lookup which sheet to use
	/// and the URL is put into the "model_url" cell of the sheet.
	///
	/// \param	mimetype	the MIME type to load the sheet for.
	/// \param	url		the URL to put into "model_url" in the
	///				cell. This is the same as the URL of the
	///				model in most cases.
	/// \return	a ready to use sheet, or NULL if no sheet could be loaded.
	///		this sheet will have to be deleted at some point.
	//
	adobe::sheet_t* getSheet( const std::string& mimetype, const std::string& url );
	//
	// boost::filesystem::path getMissionPath()
	//
	/// This function returns the path where Mission can store any data
	/// files that it has. On UNIX systems this is typically $HOME/.mission
	/// and on Windows it's inside the user's "Application Data" directory.
	///
	/// \return	the path where Mission can store it's data.
	//
	boost::filesystem::path getMissionPath();
	//
	// boost::filesystem::path getThumbnailPath()
	//
	/// This function returns the path where thumbnail previews should be
	/// stored. On UNIX systems this is typically $HOME/.thumbnails as per
	/// the freedesktop.org spec; On Windows this will be inside the
	/// mission data directory (returned by getMissionPath()) as the
	/// thumbnail cache is not shared.
	///
	/// \return	the path to store and find image thumbnails.
	//
	boost::filesystem::path getThumbnailPath();
	//
	// boost::filesystem::path getResourcePath()
	//
	/// This function returns the base path where all resources are
	/// located.
	///
	/// \return	the path to resources.
	//
	boost::filesystem::path getResourcePath();
};

#endif

